#include<stdio.h>

int character[500];
char s1[10010];
char s2[10010];

int main(){
    char c;
    int i=0;
    while((c=getchar())!='\n'){
        s1[i++]=c;
    }
    s1[i]=c;
    int j=0;
    while((c=getchar())!='\n'){
        s2[j++]=c;
        character[c]++;
    }
    s2[j]=c;
    //printf("%s",s1);
    //printf("%s",s2);
    for(int k=0;k<i;k++){
        if(character[s1[k]]==0)
            printf("%c",s1[k]);
    }
    return 0;
}
